class OliveGame extends GameInfo;

var transient OlivePawn OP;

var transient OlivePC_Watcher PCWatcher;

var transient OlivePC_Follower PCFollower;

var transient string WatcheControllerClassName;

var class<OlivePC_Watcher>  WatcherClass;
var OlivePC_Watcher			WatcherControllerRef;

var array< class<Inventory> >	DefaultInventory;


/** overriding */
function PlayerController SpawnPlayerController(vector SpawnLocation, rotator SpawnRotation)
{
	local PlayerController PC; 
	PC = Spawn(PlayerControllerClass,,, SpawnLocation, SpawnRotation);

	if(OlivePC_Follower(PC) != none)
	{
		PCFollower = OlivePC_Follower(PC);
	}
	return PC;
}

function RestartPlayer(Controller NewPlayer)
{
	local PlayerController PC;
	super.RestartPlayer(NewPlayer);
	if(OlivePawn(NewPlayer.Pawn) != none)
	{
		OP = OlivePawn(NewPlayer.Pawn);
	}
	PC = PlayerController(NewPlayer);
	PC.PlayerCamera.UpdateCamera(0.f);
	PC.GotoState('PlayerWalking');
}

function AddDefaultInventory( pawn PlayerPawn )
{
	local int i;

	for (i=0; i<DefaultInventory.Length; i++)
	{
		// Ensure we don't give duplicate items
		if (PlayerPawn.FindInventoryType( DefaultInventory[i] ) == None)
		{
			// Only activate the first weapon
			PlayerPawn.CreateInventory(DefaultInventory[i], (i > 0));
		}
	}

	PlayerPawn.AddDefaultInventory();
}


defaultproperties
{
	//DefaultInventory(0)=class'UTWeap_LinkGun'
	DefaultInventory(0)=class'OliveGame.OliveWeap_RebundGun'
	WatcherClass=class'OlivePC_Watcher'
	bDelayedStart=false
	PlayerControllerClass=class'OlivePC_Follower'
	DefaultPawnClass=class'OlivePawn'
	HUDType=class'OliveHUD'
}